import request from '@/utils/request'

// 获取权限模版所需list
export function tempPermissionListTemp (parameter) {
  return request({
    url: '/boss/tempPermission/listTemp',
    method: 'get',
    params: parameter
  })
}
// 获取权限角色模版
export function tempPermissionListRole (parameter) {
  return request({
    url: '/boss/tempPermission/listRole',
    method: 'get',
    params: parameter
  })
}
// 获取权限同步所需list
export function tempPermissionListAllTemp (parameter) {
  return request({
    url: '/boss/tempPermission/listAllTemp',
    method: 'get',
    params: parameter
  })
}
// 保存权限模版
export function tempPermissionInsert (parameter) {
  return request({
    url: '/boss/tempPermission/insert',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 修改权限模版
export function tempPermissionUpdate (parameter) {
  return request({
    url: '/boss/tempPermission/update',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 删除权限模版
export function tempPermissionDelete (parameter) {
  return request({
    url: '/boss/tempPermission/delete',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 同步权限至项目
export function tempPermissionSyncForPro (parameter) {
  return request({
    url: '/boss/tempPermission/syncForPro',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 赋予权限至角色
export function tempPermissionSyncForRoleAdd (parameter) {
  return request({
    url: '/boss/tempPermission/syncForRoleAdd',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 剔除角色权限
export function tempPermissionSyncForRoleDel (parameter) {
  return request({
    url: '/boss/tempPermission/syncForRoleDel',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 获取同步状态
export function tempPermissionGetStatus (parameter) {
  return request({
    url: '/boss/tempPermission/getStatus',
    method: 'get',
    params: parameter
  })
}